package cate.common.table.chat;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "聊天频道基础")
public class ChatChannelRow extends ERow {

    @NoteField(value = "频道ID")
    public int channel;

    @NoteField(value = "保留聊天记录")
    public int itemMax;

    @NoteField(value = "聊天间隔")
    public long chatInterval;

    @NoteField(value = "解除限制的VIP等级")
    public int vip;

    @Override
    public void parse(XSSFRowWrap xr) {
        this.id = xr.getInteger("频道ID", 0);
        this.channel = xr.getInteger("频道ID", 0);
        this.itemMax = xr.getInteger("保留聊天记录", 30);
        this.chatInterval = xr.getLong("聊天间隔", 3L) * 1000;
        this.vip = xr.getInteger("解除限制的VIP等级", 2);
    }

    @Override
    public void decode() {}
}
